package com.matthew.spring.spring.aop;

import org.aspectj.lang.ProceedingJoinPoint;
 
 
public class OrderAspectjPOJO {
 
	public void pointCut() {}
	
 
	public void checkMaterial(){
		System.out.println("before  checkMaterial");
	}
	 
	public void decreaseMaterial(){
		System.out.println("after decreaseMaterial");
	}
	 
	public void doThrow(){
		System.out.println("throwing exception");
	}
	 
	public void addGoods(ProceedingJoinPoint joinpoint){
		
		try {
			System.out.println("Around  before");
			joinpoint.proceed();
			System.out.println("Around  after");
		} catch (Throwable e) {
			// TODO Auto-generated catch block
			System.out.println("Around  throw");
			e.printStackTrace();
		}
	}
}
